package com.boe.hbd.server.servlet;

import java.util.HashMap;
import java.util.Map;

import com.boe.hbd.server.processor.PicProcessor;
import com.boe.hbd.server.processor.Processor;
import com.boe.hbd.server.processor.UserProcessor;
import com.boe.hbd.server.processor.ViewProcessor;

public class RestfulMaping {

	private static final String PIC = "pic";
	private static final String VIEW = "view";
	private static final String USER = "user";
	public static Map<String, Processor> processors = new HashMap<String, Processor>();
	static {
		processors.put(VIEW, ViewProcessor.getInstance());
		processors.put(PIC, PicProcessor.getInstance());
		processors.put(USER, UserProcessor.getInstance());
	}

	public static Processor getProcessor(String[] args) {
		return processors.get(args[1]);
	}
}
